﻿/*----------------------------------------------------------------
//  <copyright file="ResponseBase.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2023-09-14 11:20</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.SMS.Responses
{
    #region "短信响应基类"
    /// <summary>
    /// 短信响应基类
    /// </summary>
    public abstract class ResponseBase
    {
        #region "属性"
        #region "获取或设置 请求状态码"
        /// <summary>
        /// 获取或设置 请求状态码
        /// 返回OK代表请求成功
        /// 其他错误码详见 https://help.aliyun.com/document_detail/101346.html?spm=a2c4g.11186623.2.14.7430202ahgecus
        /// </summary>
        public string Code { get; set; } = "Unprocessed";
        #endregion
        #region "获取或设置 状态码的描述"
        /// <summary>
        /// 获取或设置 状态码的描述
        /// </summary>
        public string Message { get; set; } = "未处理";
        #endregion
        #region "获取或设置 请求ID"
        /// <summary>
        /// 获取或设置 请求ID
        /// </summary>
        public string RequestId { get; set; }
        #endregion

        #region "获取 是否成功"
        /// <summary>
        /// 获取 是否成功
        /// </summary>
        public bool Succeeded => Code.ToUpper() == "OK";
        #endregion

        #endregion

    }
    #endregion

}
